package cn.hwm.proxy.rpcdemo;

import cn.hwm.proxy.common.UserAddress;

import java.net.InetSocketAddress;

public class ClientTest {

    public static void main(String[] args) {
        DepotService depotService = RpcFrameClient.getRemoteProxy(DepotService.class, new InetSocketAddress("127.0.0.1", 5050));
        depotService.inDepot("001", 1000);
        depotService.outDepot("002", 200);

        SendMail sendMail = RpcFrameClient.getRemoteProxy(SendMail.class, new InetSocketAddress("127.0.0.1", 5050));
        boolean result = sendMail.sendMail(new UserAddress("张三", "zhangsan@163.com"));
        System.out.println(result);
    }

}
